package cn.edu.scau.cmi.ema.service.base;

import org.springframework.stereotype.Controller;

import java.beans.PropertyEditorSupport;
import java.util.ArrayList;
import java.util.List;

@Controller
public class CmiSelectedCompositeConditionsEditor extends PropertyEditorSupport{

	@Override
	public  void setAsText(String  str) {
		List<String> list = new ArrayList<>();
		if(str.length() > 0) {
			String[]  listString = str.split(",");
			for(String string: listString) {
				str.trim();
				list.add(string);
			}
		}
		this.setValue(list);
	}
}
